package com.neusoft.neu.fy25g01.n98.controller;


import com.neusoft.neu.fy25g01.n98.entity.CommonResult;
import com.neusoft.neu.fy25g01.n98.entity.Sysfun;
import com.neusoft.neu.fy25g01.n98.service.SysfunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

//  http://localhost:8080/sys/f/find/roleid/1
@RestController
@RequestMapping("/sys/f")
@CrossOrigin
public class SysfunContoller {
    @Autowired
    private SysfunService sysfunService;

    @GetMapping("/find/roleid/{roleid}")
    public CommonResult<List<Sysfun>> findByRoleid(@PathVariable("roleid") Integer roleid) {
        return sysfunService.findByRoleid(roleid);
    }
}
